package cn.shujuhai.common.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 用户角色关联表
 *
 * @TableName sys_user_role
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value = "sys_user_role")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysUserRole extends BaseDomain {
    @TableId(type = IdType.AUTO)
    private Long userRoleId;

    private Long userId;

    private Long roleId;

    @TableField(exist = false)
    private List<SysPermission> permissions;

}